﻿using PetaPoco;
using PmSoft;
using PmSoft.Caching;
using System.ComponentModel;

namespace Modules
{
    /// <summary>
    /// App设备信息表
    ///</summary>
    [TableName("app_device")]
    [Description("App设备信息")]
    [PrimaryKey("id", AutoIncrement = true)]
    [CacheSetting(true)]
    [Serializable]
    public class AppDevice : IEntity
    {
        /// <summary>
        /// 主键
        ///</summary>
        [Column("id")]
        public int Id { get; set; }

        /// <summary>
        /// 别名
        ///</summary>
        [Column("alias")]
        public string Alias { get; set; }

        /// <summary>
        /// 应用版本
        ///</summary>
        [Column("application_version")]
        public string? ApplicationVersion { get; set; }

        /// <summary>
        /// 系统版本
        ///</summary>
        [Column("system_version")]
        public string? SystemVersion { get; set; }

        /// <summary>
        /// rom
        ///</summary>
        [Column("rom")]
        public string? Rom { get; set; }

        /// <summary>
        /// 设备机型
        ///</summary>
        [Column("device_type")]
        public string? DeviceType { get; set; }

        /// <summary>
        /// CPU架构
        ///</summary>
        [Column("cpu_framework")]
        public string? CpuFramework { get; set; }

        /// <summary>
        /// 网络APN
        ///</summary>
        [Column("network_apn")]
        public string? NetworkApn { get; set; }

        /// <summary>
        /// 可用内存大小
        ///</summary>
        [Column("available_memory_size")]
        public long? AvailableMemorySize { get; set; }

        /// <summary>
        /// 可用SD卡大小
        ///</summary>
        [Column("available_sd_card_size")]
        public long? AvailableSdCardSize { get; set; }

        /// <summary>
        /// Bugly SDK版本号
        ///</summary>
        [Column("bugly_sdk_version")]
        public string? BuglySdkVersion { get; set; }

        /// <summary>
        /// 是否ROOT
        ///</summary>
        [Column("is_root")]
        public bool? IsRoot { get; set; }

        /// <summary>
        /// 可用存储空间
        ///</summary>
        [Column("available_storage_space")]
        public long? AvailableStorageSpace { get; set; }

        /// <summary>
        /// 使用者身份证号
        ///</summary>
        [Column("use_id_card")]
        public string? UseIdCard { get; set; }

        /// <summary>
        /// 创建时间
        ///</summary>
        [Column("create_time")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 最后一次更新时间
        ///</summary>
        [Column("last_update_time")]
        public DateTime LastUpdateTime { get; set; }

        #region IEntity 成员

        [Ignore]
        object IEntity.EntityId { get { return this.Id; } }

        #endregion IEntity 成员
    }
}